package com.lele.service;

import com.lele.dao.BaseDao;
import com.lele.pojo.Tang;

import java.sql.SQLException;
import java.util.List;

public class UserServiceImpl implements UserService{

    private BaseDao baseDao = null;

    @Override
    public int add(Tang tang) throws SQLException {
        return baseDao.add(tang);
    }

    @Override
    public int delete(int id) throws SQLException {
        return baseDao.delete(id);
    }

    @Override
    public int update(Tang tang) throws SQLException {
        return baseDao.update(tang);
    }

    @Override
    public List<Tang> selectAll() throws SQLException {
        return baseDao.selectAll();
    }

    @Override
    public Tang selectOne(int id) throws SQLException {
        return baseDao.selectOne(id);
    }

    @Override
    public List<Tang> selectLike(String name) throws SQLException {
        return baseDao.selectLike(name);
    }

    @Override
    public List<Tang> selectPaging(int pageNo, int a) throws SQLException {
        return baseDao.selectPaging(pageNo, a);
    }

    @Override
    public int selectSum() throws SQLException {
        return baseDao.selectSum();
    }
}
